package com.talent.common.enums;



/**
 * @ClassName：ResponseEnum
 * @Author: hszhou
 * @Date: 2024/10/21 13:35
 * @Description: 响应枚举
 */
public enum ResponseEnum implements TalentResponse {
    // 数据操作错误定义
    SUCCESS(200, "success"),
    FORBIDDEN(403,"无权限访问该资源，请联系管理员"),
    USERNAME_OR_PASSWORD_ERROR(500,"用户名或密码错误"),
    UNAUTHORIZED(401,"请先登录"),
    INVALID_CREDENTIALS(401,"无效的认证信息"),
    CERTIFICATION_EXPIRED(401,"登陆已过期,请重新登陆"),
    DATA_NOT_FOUND(401,"数据不存在"),
    ERROR(500,"后台错误");

    /**
     * 错误码
     */
    private final Integer code;

    /**
     * 错误描述
     */
    private final String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }


    @Override
    public Integer getCode() {
        return code;
    }


    public String getMessage() {
        return message;
    }

}
